package com.xx.sg.own.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sg_lighting_monitoring")
public class LightingMonitoring {

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    //林业局
    @TableField(value = "forestry_bureau")
    private String forestryBureau;

    //林场
    @TableField(value = "forest_farm")
    private String forestFarm;

    //发生时间
    @TableField(value = "occurrence_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime occurrenceTime;

    //纬度
    @TableField(value = "latitude")
    private String latitude;

    //经度
    @TableField(value = "longitude")
    private String longitude;

    //电流强度
    @TableField(value = "current_intensity")
    private String currentIntensity;

    //雷电等级
    @TableField(value = "level")
    private String level;

    @TableField(exist = false)
    private String date;
}

